﻿namespace Vkontakte.Api.Operations
{
	[ApiMethod("activity.get")]
	public sealed class ActivityGet
		:Base30ApiOperation
	{
		private ActivityResponce _responce;

		public ActivityGet()
		{
			
		}

		protected override void Compile()
		{
			AddParameter("method", "activity.get");
			if (UserID != null)
			{
				AddParameter("uid", UserID.Value.ToString());
			}

			base.Compile();
		}

		protected override void ParseData(string data)
		{
			_responce = Serializer.LoadObjectXmlString<ActivityResponce>(data);
			_responce.Activity=_responce.Activity.FixXmlString();
			base.ParseData(data);
		}

		public long? UserID { get; set; }

		public ActivityResponce Activity
		{
			get { return _responce; }
		}
	}
	//
}